package com.cykj.controller;

import com.cykj.service.OrderService;
import com.cykj.util.ResponseDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @RequestMapping("/getAllOrder")
    public ResponseDto getAllOrder(){
        return orderService.getAllOrder();
    }
    @RequestMapping("/alterStatus")
    public ResponseDto alterStatus(String orderExaminationId,int status) {
        return orderService.alterStatus(orderExaminationId, status);
    }
    @RequestMapping( "/getProjectPrice")
    public ResponseDto getProjectPrice(int status,String name){
        return orderService.getProjectPrice(status,name);
    }
    @RequestMapping("/getDepartName")
    public ResponseDto getDepartName(int status,String name) {
        return orderService.getDepartName(status,name);
    }
    @RequestMapping("/dealName")
    public ResponseDto dealName(int id){
        return orderService.dealName(id);
    }
    @RequestMapping("/getInfo")
    public ResponseDto getInfo(String id , int sort) {
        return orderService.getInfo(id,sort);
    }
    @RequestMapping("/getProName")
    public ResponseDto getProName(String name) {
        return orderService.getProName(name);
    }
}
